import java.util.Scanner;

public class 计算器 {
    public static void main(String[] args) {
        System.out.println(
                "*********************************\n" +
                        "*****微型计算器               ****\n" +
                        "*****1、求和                 ****\n" +
                        "*****2、求差                 ****\n" +
                        "*****3、求积                 ****\n" +
                        "*****4、求商                 ****\n" +
                        "*****5、求余                 ****\n" +
                        "*****Q、退出                 ****\n" +
                        "*****请选择您想执行的操作       ****\n" +
                        "*********************************\n");
        Scanner sc = new Scanner(System.in);
        String num = sc.next();
        switch (num) {
            case "1":
                Scanner sc1 = new Scanner(System.in);
                Scanner sc2 = new Scanner(System.in);
                System.out.println("请输入数字");
                int add = sc1.nextInt() + sc2.nextInt();
                System.out.println("和为" + add);
                break;
            case "2":
                Scanner sc3 = new Scanner(System.in);
                Scanner sc4 = new Scanner(System.in);
                System.out.println("请输入数字");
                int subtract = sc3.nextInt() - sc4.nextInt();
                System.out.println("差为" + subtract);
                break;
            case "3":
                Scanner sc5 = new Scanner(System.in);
                Scanner sc6 = new Scanner(System.in);
                System.out.println("请输入数字");
                int multiply = sc5.nextInt() * sc6.nextInt();
                System.out.println("积为" + multiply);
                break;
            case "4":
                Scanner sc7 = new Scanner(System.in);
                Scanner sc8 = new Scanner(System.in);
                System.out.println("请输入数字");
                int divide = sc7.nextInt() / sc8.nextInt();
                System.out.println("商为" + divide);
                break;
            case "5":
                Scanner sc9 = new Scanner(System.in);
                Scanner sc10 = new Scanner(System.in);
                System.out.println("请输入数字");
                int remain = sc9.nextInt() % sc10.nextInt();
                System.out.println("余为" + remain);
                break;
            case "Q":
                System.out.println("程序结束");
        }
    }
}

